<div class="col-md-9">
<div class="page-header">
	<h2>Phí vận chuyển</h2>
</div>
<style>
.location{width:100%;height:30px;}
</style>
<table class="table table-striped" cellspacing="0" cellpadding="0">
	<thead>
		<th style="width:95px"> Vùng \ TL </th>
        <?php foreach ($ship_weights as $item){if($item->id == 0){$weights_start = 'Thêm '.$item->value." (g)";}else{?>
        	<th align="center"><?php echo $item->value;?> (g)</th>
        <?php }}?>
        <th  align="center"><?php echo $weights_start ?></th>
    </thead>
    <tbody>
    	<?php  foreach($ship_locations as $item){?>
        	<tr >
       			<td align="center"><select class="location"><option >vùng <?php echo $item->value;?></option><?php if(!empty($item->around)){foreach($item->around as $item_around)echo '<option>'.$item_around->name.'</option>';} ?></select></td>
                <?php $i=0; foreach ($ship_costs as $cost){?>
               		<?php if($cost->location_id==$item->id){?>
                    	<?php if($i ==0){$location_start = format_currency($cost->value);$i=1;}else{?>
                    		<td align="center"><?php echo format_currency($cost->value);?></td>
                        <?php }?>
                <?php }}?>
                <td align="center"> <?php echo $location_start?> </td>
            </tr>
        <?php }?>
        
    </tbody>
</table>
</div>